package simulation;

/**
 * A framework for all forces
 * @author Natalia Carvalho
 */
public abstract class Force {
    private boolean myIsActive = true;
    /**
     * Index of force
     */
    private int myIndex;

    /**
     * Set index of force based on force
     * @param index indicates force
     */
    public Force(int index) {
        myIndex = index;
    }
    
    /**
     * Empty constructor
     */
    public Force() {
    }
    
    abstract void applyForce(Mass m);

    /**
     * Get boolean isActive; used for toggle force
     */
    public boolean isActive () {
        return myIsActive;
    }

    /**
     * Set isActive; used for toggle
     */
    public void toggle () {
        myIsActive = !myIsActive;
    }
    
    /**
     * Toggle force based on wall
     * @param wall is ID of wall - 1:top, 2:right, 3:bottom, 4:left
     */
    public void toggle (int wall) {
    }
    
    /**
     * Get index
     */
    public int getIndex () {
        return myIndex;
    }
    
    /**
     * Set index
     * @param index 
     */
    public void setIndex (int index) {
        myIndex = index;
    }
}
